<template>
  <div class="app-container">
    <form-filter :percentage="percentage"
                 :down-load-loading="downLoadLoading"
                 @on-filter="submitFilterForm"
                 :show-down-percentage="showDownPercentage"
                 @on-export="exportFilterForm"/>
      <div class="batch-review">
        <el-button class="filter-item" type="primary"  @click="showAuditDialogBatch(1)" v-if="roleCheck('first-audit')">批量一审 </el-button>
        <el-button class="filter-item" type="primary"   @click="showAuditDialogBatch(2)" v-if="roleCheck('second-audit')">批量二审 </el-button>
      </div>
    <el-table
      border
      :data="tableData.list" v-loading="loading" element-loading-text="加载中..." ref="multipleTable" @selection-change="handleSelectionChange">
      <el-table-column type="selection" width="55"  v-if="roleCheck('first-audit')||roleCheck('second-audit')"></el-table-column>
      <el-table-column label="操作类型" prop="optType" align="center">
        <template slot-scope="{row}">
          {{formatOptType(row)}}
        </template>
      </el-table-column>
      <el-table-column label="操作内容" align="center">
         <el-table-column label="修改前内容" prop="optBeforeData" width="120" align="center">
          <template slot-scope="{row}">
          <!--{{formatOptData(row,1)}}-->
          <div class="option-data-view" v-if="row.optType === 15 && row.formatOptDataBefore.commMode">
            <div
              class="option-item-view"
              v-if="row.formatOptDataBefore.commMode === 1"
            >
              <div>佣金链模式：现金网</div>
              <div
                v-for="(item, index) in row.formatOptDataBefore.itemList"
                :key="index"
              >
                {{index + 1}}级代理：{{item.proxyName || '--'}}，抽佣百分比：{{item.rate || 0}}%
              </div>
              <div>佣金方案：{{formatCashRuleName(row.formatOptDataBefore.cashRuleId)}}</div>
            </div>
            <div
              class="option-item-view cash-view"
              v-if="row.formatOptDataBefore.commMode === 2"
              @click="checkOpenDialog({ props: row, dialogName: dialogType.cashDetail},0)"
            >
              <div>佣金链模式：信用网</div>
              <div
                v-for="(item, index) in row.formatOptDataBefore.itemList"
                :key="index"
              >
                <div v-if="formatCashItem(row, index, 1)">
                  {{index + 1}}级代理：{{item.proxyName || '--'}}，分配百分比：{{item.rate || 0}}%
                </div>
                <div v-else :style="getShowStyle(index)">
                  ......
                </div>
              </div>
              <div>最低有效会员数：{{(row.formatOptDataBefore.minEffectMemberNum || 0)}}</div>
            </div>
          </div>
            <div v-else>
              {{row.optBeforeData}}
            </div>
        </template>
        </el-table-column>
        <el-table-column label="修改后内容" prop="optAfterData" width="120" align="center">
         <template slot-scope="{row}">
          <!--{{formatOptData(row)}}-->
          <div class="option-data-view" v-if="row.optType === 15 && row.formatOptDataAfter.commMode">
            <div
              class="option-item-view"
              v-if="row.formatOptDataAfter.commMode === 1"
            >
              <div>佣金链模式：现金网</div>
              <div
                v-for="(item, index) in row.formatOptDataAfter.itemList"
                :key="index"
              >
                {{index + 1}}级代理：{{item.proxyName || '--'}}，抽佣百分比：{{item.rate || 0}}%
              </div>
              <div>佣金方案：{{formatCashRuleName(row.formatOptDataAfter.cashRuleId)}}</div>
            </div>
            <div
              class="option-item-view cash-view"
              v-if="row.formatOptDataAfter.commMode === 2"
              @click="checkOpenDialog({ props: row, dialogName: dialogType.cashDetail},1)"
            >
              <div>佣金链模式：信用网</div>
              <div
                v-for="(item, index) in row.formatOptDataAfter.itemList"
                :key="index"
              >
                <div v-if="formatCashItem(row, index, 2)">
                  {{index + 1}}级代理：{{item.proxyName || '--'}}，分配百分比：{{item.rate || 0}}%
                </div>
                <div v-else :style="getShowStyle(index)">
                  ......
                </div>
              </div>
              <div>最低有效会员数：{{(row.formatOptDataAfter.minEffectMemberNum || 0)}}</div>
            </div>
          </div>
           <div v-else>
             {{row.optAfterData === '' ? formatOptData(row) : row.optAfterData}}
           </div>
        </template>
        </el-table-column>
      </el-table-column>
      <!-- <el-table-column label="操作内容" prop="optData" align="center" width="260">
        <template slot-scope="{row}">
          {{formatOptData(row)}}
          <div class="option-data-view" v-if="row.optType === 15 && row.formatOptData.commMode">
            <div
              class="option-item-view"
              v-if="row.formatOptData.commMode === 1"
            >
              <div>佣金链模式：现金网</div>
              <div
                v-for="(item, index) in row.formatOptData.itemList"
                :key="index"
              >
                {{index + 1}}级代理：{{item.proxyName || '--'}}，抽佣百分比：{{item.rate || 0}}%
              </div>
              <div>佣金方案：{{formatCashRuleName(row.formatOptData.cashRuleId)}}</div>
            </div>
            <div
              class="option-item-view cash-view"
              v-if="row.formatOptData.commMode === 2"
              @click="openDialog({ props: row, dialogName: dialogType.cashDetail})"
            >
              <div>佣金链模式：信用网</div>
              <div
                v-for="(item, index) in row.formatOptData.itemList"
                :key="index"
              >
                <div v-if="formatCashItem(row, index)">
                  {{index + 1}}级代理：{{item.proxyName || '--'}}，分配百分比：{{item.rate || 0}}%
                </div>
                <div v-else :style="getShowStyle(index)">
                  ......
                </div>
              </div>
              <div>最低有效会员数：{{(row.formatOptData.minEffectMemberNum || 0)}}</div>
            </div>
          </div>
        </template>
      </el-table-column> -->
      <el-table-column label="账户名" prop="username" align="center" width="120">
      </el-table-column>
      <!--<el-table-column label="账户类型" prop="userType" align="center" width="120">-->
        <!--<template slot-scope="{row}">-->
          <!--{{ row.userType | toConverter('ACCOUNT_TYPE') }}-->
        <!--</template>-->
      <!--</el-table-column>-->
        <el-table-column label="申请人" prop="creator" align="center" width="100">
        </el-table-column>
        <el-table-column label="申请时间" prop="createTime" align="center" min-width="160">
          <template slot-scope="{row}">
            {{row.createTime | toTime}}
          </template>
        </el-table-column>

      <el-table-column label="一审状态" fixed="right" prop="auditFirStatus" align="center" width="100">
        <template slot-scope="{row}">
          <el-button type="text" v-if="row.status === 2" @click="roleCheck('first-audit')?showAuditDialog(row,1):null" :style="{color:roleCheck('first-audit')?'#409eff':'#666'}">审核未通过</el-button>
          <el-button type="text" v-else-if="row.status === 0" @click="isPermissionMehod('first-audit', 0, row)" :style="isPermissionCss('first-audit', 0, row)">待审核</el-button>
          <el-button type="text" v-else @click="roleCheck('first-audit')?showAuditDialog(row,1):null" :style="{color:roleCheck('first-audit')?'#409eff':'#666'}">审核通过</el-button>
        </template>
      </el-table-column>
      <el-table-column label="一审人" fixed="right" prop="firstApprover" align="center" width="100">
      </el-table-column>
      <el-table-column label="审核时间" fixed="right" prop="firstTime" align="center" min-width="160">
        <template slot-scope="{row}">
          {{row.firstTime | toTime}}
        </template>
      </el-table-column>
      <el-table-column label="二审状态" fixed="right" prop="auditSecStatus" align="center" width="100">
        <template slot-scope="{row}" v-if="row.status === 1 || row.status>2">
          <el-button type="text" v-if="row.status === 3" @click="roleCheck('second-audit')?showAuditDialog(row,2):null" :style="{color:roleCheck('second-audit')?'#409eff':'#666'}">审核通过</el-button>
          <el-button type="text" v-else-if="row.status === 4" @click="roleCheck('second-audit')?showAuditDialog(row,2):null" :style="{color:roleCheck('second-audit')?'#409eff':'#666'}">审核未通过</el-button>
          <el-button type="text" v-else-if="row.status === 1" @click="isPermissionMehod('first-audit', 1, row)" :style="isPermissionCss('first-audit', 1, row)">待审核</el-button>
        </template>
      </el-table-column>
      <el-table-column label="二审人" fixed="right" prop="secondApprover" align="center" width="100">
      </el-table-column>
      <el-table-column label="审核时间" fixed="right" prop="secondTime" align="center" min-width="160">
        <template slot-scope="{row}">
          {{ row.secondTime | toTime}}
        </template>
      </el-table-column>
    </el-table>

    <div class="pagination-container">
      <el-pagination background @size-change="gridSizeChange" @current-change="gridCurrentChange"
                     :current-page="filters.page" :page-sizes="gridPageSize" :page-size="filters.size"
                     :layout="gridLayout" :total="tableData.total">
      </el-pagination>
    </div>
    <AuditDialog
      v-if="dialogName === dialogType.audit"
      v-model="dialogVisible"
      :rowData="dialogProps"
      :id="dialogProps.id"
      :audit-step= "auditStep"
      :commCaseSeleList="commCaseSeleList"
      :commSeleList="commSeleList"
      @submit="submitFinished"
    />
    <CashDetailDialog
      v-if="dialogName === dialogType.cashDetail"
      v-model="dialogVisible"
      :rowData="openType === 0 ? dialogProps.formatOptDataBefore : dialogProps.formatOptDataAfter"
      :userName="dialogProps.username"
      @submit="submitFinished"
    />
    <audit-dialog-multi
      v-model="auditDialogVisibleMulti"
      v-if="auditDialogVisibleMulti"
      :row-data="rowData"
      :id="ids"
      :audit-step="auditStep"
      :menuIds="menuIds"
    />
  </div>
</template>


<script>

// utils
import { formatCommMode } from '@/utils/base';

// components
import FormFilter from './formFilter';
import AuditDialog from './auditDialog';
import CashDetailDialog from './cashDetailDialog';
import AuditDialogMulti from '@/views/agency/updateAudit/auditDialogMulti';
// services
import { getCommissionSelect, getCommissionCaseSelectList } from '@/services/api/commission';
import { getAuditList } from '@/services/api/audit';


// mixins
import { grid, dialog } from '@/build';

const dialogType = {
  audit: 'audit-dialog',
  cashDetail: 'cash-detail-dialog',
};

export default {
  name: 'agency-update-audit',
  components: {
    FormFilter,
    AuditDialog,
    CashDetailDialog,
    AuditDialogMulti,
  },
  mixins: [grid, dialog],
  data() {
    return {
      ids: [], // 批量审核的id数组
      rowData: {},
      rowDataList: [], // 批量审核选中的数据
      tableData: {},
      auditStep: 0,
      auditDialogVisible: false,
      auditDialogVisibleMulti: false, // 是否显示批量审核确认框
      filters: {
        userType: 1,
        dateType: 0,
        page: 1,
        size: 20,
        status: -1,
        startDate: moment().format('YYYY-MM-DD 00:00:00'),
        endDate: moment().format('YYYY-MM-DD 23:59:59'),
      },
      filterDateType: false,
      commSeleList: [],
      commCaseSeleList: [],
      dialogType,
      openType: 0, // 0修改前 1修改后
      dataPermissionObj: {
        1: ['agenChangeSuperiorAgency-firstAudit', 'agenChangeSuperiorAgency-secondAudit'],
        2: ['agenChangeContact-firstAudit', 'agenChangeContact-secondAudit'],
        3: ['agenResetBankCardName-firstAudit', 'agenResetBankCardName-secondAudit'],
        4: ['agenWholeLock-firstAudit', 'agenWholeLock-secondAudit'],
        5: ['agenIndirectLock-firstAudit', 'agenIndirectLock-secondAudit'],
        6: ['agenUnLock-firstAudit', 'agenUnLock-secondAudit'],
        17: ['agenLoginLock-firstAudit', 'agenLoginLock-secondAudit'],
        8: ['agenDeleteBank-firstAudit', 'agenDeleteBank-secondAudit'],
        9: ['agenModifyRemark-firstAudit', 'agenModifyRemark-secondAudit'],
        10: ['agenModifyAddScoreSet-firstAudit', 'agenModifyAddScoreSet-secondAudit'],
        11: ['agenClearAudit-firstAudit', 'agenClearAudit-secondAudit'],
        13: ['agenAddScoreSet-firstAudit', 'agenAddScoreSet-secondAudit'],
        14: ['agenChangeFee-firstAudit', 'agenChangeFee-secondAudit'],
        15: ['agenModifyCommission-firstAudit', 'agenModifyCommission-secondAudit'],
        20: ['agenflushCash-firstAudit', 'agenflushCash-secondAudit'],
      },
      menuId: '',
      menuIds: [],
      exportData: [],
      downLoadLoading: false,
      showDownPercentage: false,
      percentage: 0,
    };
  },
  methods: {
    async exportHandle(page = 1) {
      // dateType: 0,
      //   time: [
      //   moment().format('YYYY-MM-DD 00:00:00'),
      //   moment().format('YYYY-MM-DD 23:59:59'),
      // ],
      //   userType: 1, // 0-会员，1-代理
      //   optType: -1,
      //   creator: undefined,
      //   firstApprover: undefined,
      //   secondApprover: undefined,
      //   status: -1,
      //   username: undefined,

      const {
        userType, username, optType, creator, firstApprover, secondApprover, dateType, status, startTime, endTime,
      } = this.filters;
      const size = 1000;
      const ajaxData = {
        userType,
        username,
        optType,
        creator,
        firstApprover,
        secondApprover,
        dateType,
        status,
        startDate: startTime,
        endDate: endTime,
        page,
        size,
      };
      const filename = '操作审核报表.csv';
      // const header = ['操作类型', '修改前内容', '修改后内容', '账户名', '申请人', '申请时间', '一审状态', '一审人', '审核时间', '二审状态', '二审人', '审核时间'];
      // const filterField = ['optTypeLabel', 'optBeforeData', 'optAfterData', 'username', 'creator', 'createTime', 'auditFirStatus', 'firstApprover', 'firstTime', 'auditSecStatus', 'secondApprover', 'secondTime'];
      const header = ['操作类型', '修改前内容', '修改后内容', '账户名', '申请人', '申请时间', '一审状态', '一审人', '审核时间', '一审备注内容', '二审状态'];
      const filterField = ['optTypeLabel', 'optBeforeData', 'optAfterData', 'username', 'creator', 'createTime', 'auditFirStatus', 'firstApprover', 'firstTime', 'firstRemark', 'auditSecStatus'];
      // exportThirdCharge(ajaxData).then(([result, data]) => {
      //   if (result) {
      //     const exportData = this.responseFormatter(data.list);
      //     this.export2Excel(header, filterField, exportData, filename);
      //   } else {
      //     this.$message({ message: `导出失败,${data.message}`, type: 'warning' });
      //   }
      // });
      this.showDownPercentage = true;
      this.downLoadLoading = true;
      const [result, data] = await getAuditList(ajaxData);
      if (result) {
        if (data && data.list.length > 0) {
          const allPage = Math.ceil(data.total / size);
          data.list = data.list.map(this.formatListData);
          this.exportData = [...this.exportData, ...this.responseFormatter(data.list)];
          this.percentage = (page / allPage).toFixed(2) * 100;
          if (page < allPage) {
            this.exportHandle(page + 1);
          } else {
            this.export2Excel(header, filterField, this.exportData, filename);
            this.exportData = [];
            setTimeout(() => {
              this.initDownLoad();
            }, 1000);
          }
        } else {
          this.$message({ message: '导出内容为空，请重新选择', type: 'warning' });
          this.initDownLoad();
        }
      } else {
        this.$message({ message: `导出失败,${data.message}`, type: 'warning' });
        this.initDownLoad();
      }
    },
    initDownLoad() {
      this.showDownPercentage = false;
      this.percentage = 0;
      this.downLoadLoading = false;
    },
    responseFormatter(data) {
      data.map((item) => {
        item.optTypeLabel = item.optType === 7 ? '变更手续费方案' : item.optDesc;
        if (item.optType === 15 && item.formatOptDataBefore.commMode) {
          let str;
          if (item.formatOptDataBefore.commMode === 1) {
            str = '佣金链模式：现金网\n';
            item.formatOptDataBefore.itemList.forEach((ele, index) => {
              str += `${index + 1}级代理：${ele.proxyName || '--'}，抽佣百分比：${ele.rate || 0}%\n`;
            });
            str += `佣金方案：${this.formatCashRuleName(item.formatOptDataBefore.cashRuleId)}\n`;
          }
          if (item.formatOptDataBefore.commMode === 2) {
            str = '佣金链模式：信用网\n';
            item.formatOptDataBefore.itemList.forEach((ele1, index) => {
              if (this.formatCashItem(item, index, 1)) {
                str += `${index + 1}级代理：${item.proxyName || '--'}，分配百分比：${item.rate || 0}%\n`;
              } else {
                str += '......\n';
              }
            });
            str += `${item.formatOptDataBefore.minEffectMemberNum || 0}`;
          }
          item.optBeforeData = str;
        }

        if (item.optType === 15 && item.formatOptDataAfter.commMode) {
          let str = '';
          if (item.formatOptDataAfter.commMode === 1) {
            str += '佣金链模式：现金网\n';
            item.formatOptDataAfter.itemList.forEach((ele, index) => {
              str += `${index + 1}级代理：${ele.proxyName || '--'},抽佣百分比：${ele.rate || 0}%\n`;
            });
            str += `佣金方案：${this.formatCashRuleName(item.formatOptDataAfter.cashRuleId)}\n`;
          }
          if (item.formatOptDataAfter.commMode === 2) {
            str += '佣金链模式：信用网\n';
            item.formatOptDataAfter.itemList.forEach((ele2, index) => {
              if (this.formatCashItem(item, index, 2)) {
                str += `${index + 1}级代理：${ele2.proxyName || '--'}，分配百分比：${ele2.rate || 0}%\n`;
              } else {
                str += '......\n';
              }
            });
            str += `最低有效会员数：${item.formatOptDataAfter.minEffectMemberNum || 0}\n`;
          }
          item.optAfterData = str;
        } else {
          item.optAfterData = item.optAfterData === '' ? this.formatOptData(item) : item.optAfterData;
        }
        item.createTime = _.toTime(item.createTime);
        item.auditFirStatus = this.transFormStatus(item.status, 1);
        item.firstTime = _.toTime(item.firstTime);
        item.auditSecStatus = this.transFormStatus(item.status, 2);
      });
      return data;
    },
    // 转换状态
    transFormStatus(status, type) {
      if (type === 1) {
        return (status === 2 ? '审核未通过' : status === 0 ? '待审核' : '审核通过');
      }
      let temp;
      switch (status) {
        case 3:
          temp = '审核通过';
          break;
        case 4:
          temp = '审核未通过';
          break;
        case 1:
          temp = '待审核';
          break;
        default:
          break;
      }
      return temp;
    },
    // 表格前面的checkbox操作
    handleSelectionChange(val) {
      this.rowDataList = val;
    },
    formatCommMode,
    formatOptType({ optType, optDesc }) {
      if (optType === 7) return '变更手续费方案';
      return optDesc;
    },
    formatFeeRuleName(id) {
      if (!this.commSeleList.length) return null;
      const { name } = this.commSeleList.find(item => item.id === Number(id)) || {};
      return name;
    },
    formatCashRuleName(id) {
      if (!this.commCaseSeleList.length) return null;
      const { name } = this.commCaseSeleList.find(item => item.id === id) || {};
      return name;
    },
    formatOptData(value, type) {
      const {
        optType, optBeforeData, optData, optDesc,
      } = value;
      const contentData = (type && type === 1) ? optBeforeData : optData;
      switch (optType) {
        case 1:
          return `上级代理ID：${contentData}`;
        case 2:
          return `修改：${contentData}`;
        case 3:
          return '重置银行卡及姓名';
        case 4:
          return '状态修改：完全锁定';
        case 5:
          return '状态修改：间接锁定';
        case 6:
          return '状态修改：解除锁定';
        case 7:
          return optDesc ? optDesc.replace('修改代理返佣模式:', '变更为:') : null;
        case 8:
          return `银行卡ID：${contentData}`;
        case 9:
          return `修改备注：${contentData}`;
        case 10:
          const optDataArr = contentData.split(',');
          return `额度：${optDataArr[0]}，状态：${_.toConverter(parseInt(optDataArr[1]), 'AGENCY_CREDIT_STATUS')}`;
        case 11:
          return `清算额度：${contentData}`;
        case 13:
          return `状态：${contentData == 1 ? '开启' : '关闭'}`;
        case 14:
          return this.formatFeeRuleName(contentData);
        case 15:
          return null;
        default:
          return contentData;
      }
    },
    formatCashItem(row, index, type) {
      const len = type === 1 ? row.formatOptDataBefore.itemList.length : row.formatOptDataAfter.itemList.length;
      if (len < 3) return true;
      if (index === len - 1 || index < 2) return true;
      return false;
    },
    getShowStyle(index) {
      if (index === 2) return {};
      return { display: 'none' };
    },
    submitFilterForm(formInline) {
      const { time } = formInline;
      let startDate;
      let endDate;
      if (!_.isUndefined(time) && _.isArray(time)) {
        startDate = time[0];
        endDate = time[1];
        formInline = { ...formInline, startDate, endDate };
      } else {
        this.filters.startDate = undefined;
        this.filters.endDate = undefined;
      }
      this.filters = { ...this.filters, ...formInline };
      this.gridSearch();
    },
    /*
       * step:
       * 1.批量一审
       * 2.批量二审
       */
    showAuditDialogBatch(step) { // 批量审核
      if (this.ids.length === 0 && !this.rowData) {
        this.$message({
          type: 'warning',
          message: '请选中需要处理的数据',
        });
        return;
      }
      this.auditStep = step;
      this.ids = [];
      this.menuIds = [];
      let flag = false;
      if (this.auditStep == 1) { // 批量一审
        this.rowDataList.forEach((element) => {
          if (element.status == 0) {
            flag = true;
            this.rowData = element;
            this.ids.push(element.manageId);
            this.menuIds.push(element.firstMenuId);
          }
        });
        if (!flag) {
          this.$message({
            type: 'warning',
            message: '没有需要一审的操作,请重新选择数据',
          });
          return;
        }
      } else if (this.auditStep == 2) { // 批量二审
        this.rowDataList.forEach((element) => {
          if (element.status == 1) {
            flag = true;
            this.rowData = element;
            this.ids.push(element.manageId);
            this.menuIds.push(element.secondMenuId);
          }
        });
        if (!flag) {
          this.$message({
            type: 'warning',
            message: '没有需要二审的操作,请重新选择数据',
          });
          return;
        }
      }
      this.auditDialogVisibleMulti = true;
    },
    showAuditDialog(row, step, menuId) {
      this.auditStep = step;
      row.menuId = menuId;
      this.openDialog({ props: row, dialogName: dialogType.audit });
    },
    checkOpenDialog(data, type) {
      this.openType = type;
      this.openDialog(data);
    },
    isPermissionMehod(audit, num, row) {
      const menuId = num === 0 ? row.firstMenuId : row.secondMenuId;
      return this.roleCheck(audit) && this.dataRoleCheck(this.dataPermissionObj[row.optType][num]) ? this.showAuditDialog(row, num + 1, menuId) : null;
    },
    isPermissionCss(audit, num, row) {
      return { color: this.roleCheck(audit) && this.dataRoleCheck(this.dataPermissionObj[row.optType][num]) ? '#409eff' : '#666' };
    },
    isJson(str) {
      if (typeof str === 'string') {
        try {
          const obj = JSON.parse(str);
          if (typeof obj === 'object' && obj) {
            return true;
          }
          return false;
        } catch (e) {
          return false;
        }
      }
    },
    formatListData(item = {}) {
      if (item.optType !== 15) {
        return {
          ...item,
          firstMenuId: dataPermission.DATA_PERMISSION[this.dataPermissionObj[item.optType][0]],
          secondMenuId: dataPermission.DATA_PERMISSION[this.dataPermissionObj[item.optType][1]],
        };
      }
      return {
        ...item,
        formatOptDataBefore: this.isJson(item.optBeforeData) ? JSON.parse(item.optBeforeData) : item.optBeforeData ? item.optBeforeData : '',
        formatOptDataAfter: item.optAfterData === '' ? (item.optData === '' ? '' : JSON.parse(item.optData)) : JSON.parse(item.optAfterData),
        firstMenuId: dataPermission.DATA_PERMISSION[this.dataPermissionObj[item.optType][0]],
        secondMenuId: dataPermission.DATA_PERMISSION[this.dataPermissionObj[item.optType][1]],
      };
    },
  },
  mounted() {
    this.bindGet(getCommissionSelect, 'commSeleList');
    this.bindGet(getCommissionCaseSelectList, 'commCaseSeleList');
    this.bindGet(getAuditList, 'tableData', {
      action: 'getGrid',
      sendingData: 'filters',
      format: (data) => {
        const { list = [] } = data;
        const resList = list.map(this.formatListData);
        return {
          ...data,
          list: resList,
        };
      },
    });
    this.getAll();
  },
};
</script>
<style lang="scss" scoped>
  .option-data-view {

    .option-item-view {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
    }

    .cash-view {
      color: #409eff;
      cursor: pointer;
    }
  }
  .batch-review{padding:10px 0}
</style>
